package com.ten.shou.feign;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ten.common.core.entity.EduCourse;
import com.ten.common.core.entity.EduSubject;
import com.ten.common.core.vo.Result;

import com.ten.shou.vo.CourseCheckVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @author ：张成（3092211427@qq.com）
 * @date ：Created in 2022/12/1922:50
 * @description： 调用远程微服务 education-course
 * @modified By：
 * @version:
 */
@FeignClient(value = "education-course")
public interface CourseListFeign {
    @PostMapping("/core/course/findCourse/{pageCurrent}/{pageSize}")
    Result<Page<EduCourse>> findCourse(
            @PathVariable Integer pageCurrent,
            @PathVariable Integer pageSize,
            @RequestBody CourseCheckVo courseCheckVo);


    @PostMapping("/core/course/updateIsAdd")
    Result updateIsAdd(@RequestBody EduCourse eduCourse);

    @PostMapping("/core/subject/findSubjectByStatus")
    Result<List<EduSubject>> findSubjectByStatus();

    @GetMapping("/core/course/getCoursesByConditions")
    Result<List<EduCourse>> getCoursesByConditions();

    @PostMapping("/core/course/getAllDetail/{pageCurrent}/{pageSize}")
    Result<Page<EduCourse>> getAllDetail(
            @PathVariable Integer pageCurrent,
            @PathVariable Integer pageSize,
            @RequestBody CourseCheckVo courseCheckVo
    );
}